<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>WISSC轮滑教培服务网-查询系统</title>
	<#assign base=request.contextPath  />
    <link rel="icon" href="${base}/favicon.ico">
    <link rel="stylesheet" href="${base}/frame/layui/css/layui.css">
    <script src="${base}/frame/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="${base}/js/ztree/jquery-1.4.4.min.js"></script>
    <script src="${base}/js/jquery.min.js"></script>
    <script type="text/javascript" src="${base}/js/feng.js"></script>
    <link rel="stylesheet" type="text/css" href="${base}/css/hzw-city-picker.css">
    <script type="text/javascript" src="${base}/js/city-data.js"></script>
    <script type="text/javascript" src="${base}/js/hzw-city-picker.min.js"></script>
</head>
<body>
<form class="layui-form" action="" style="margin: 10px">
    <div class="layui-form-item">
        <input type="hidden" id="id" value="${model!''}"/>

        <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label"><a style="color:red">*</a>&nbsp;配置类型</label>
            <div class="layui-input-inline">
                <input readonly="true" name="type" id="type" lay-verify="required" autocomplete="off" class="layui-input isNull"
                       type="text">
            </div>
        </div>
<div>
    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label"><a style="color:red">*</a>&nbsp;配置值</label>
            <div class="layui-input-inline">
                <input name="parameter" id="parameter" lay-verify="required" autocomplete="off" class="layui-input isNull"
                       type="text">
            </div>
        </div>
        <div>
    </div>
        <div class="layui-form-item" style="text-align:center">
            <div class="layui-input-block">
                <button class="layui-btn" lay-submit lay-filter="formDemo" type="button"
                        onclick="onSubmit()" style="background-color: #0092EF;">立即提交
                </button>

            </div>
        </div>
</form>


    <script type="text/javascript">

        layui.use(['form', 'layedit', 'laydate','layer'], function(){
            var form = layui.form
                    ,layer = layui.layer
                    ,layedit = layui.layedit
                    ,laydate = layui.laydate;



        });

    </script>
<script>
    //编辑
    function onSubmit() {

        var jsonDate = {};
        jsonDate.type = $("#type").val();
        jsonDate.parameter = $("#parameter").val();
        jsonDate.id = $("#id").val();
        if(jsonDate.parameter!=null&&jsonDate.parameter!=""){
            $.ajax({
                type:"POST",
                contentType: "application/json;charset=UTF-8",
                url:"${base}/webPage/webPage_edit",
                data:JSON.stringify(jsonDate),
                success:function(data){
                    // alert(JSON.stringify(data))

                    setTimeout(function(){
                        var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
                        parent.layer.close(index); //再执行关闭

                    },300)
                    var table = parent.layui.table;
                    //表刷新方法
                    table.reload('testReload', {
                        url: '${base}/webPage/selectMyPage'//数据接口
                        , where: {} //设定异步数据接口的额外参数
                        //,height: 300
                    });

                }

            });
        }else{
            layer.msg("必选项不能为空");
        }





    }


</script>

</body>
</html>
